package main

import (
	"behind/models"
	"behind/pkg/setting"
	"behind/routers"
	"fmt"

	"github.com/garyburd/redigo/redis"
)

func main() {
	setting.Setup()
	models.Setup()
	endPoint := fmt.Sprintf(":%d", setting.ServerSetting.HttpPort)
	r := routers.InitRouter()

	r.Run(endPoint)
	conn, err := redis.Dial("tcp", "127.0.0.1:6379")
	if err != nil {
		fmt.Println("connect redis failed,", err)
		return
	}
	defer conn.Close()
	
}
